package io.serializable;

import framework.AbstractTest;
import utils.Log;

import java.io.FileInputStream;
import java.io.ObjectInputStream;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by shane on 2018/5/28.
 */
public class RecoverCADState extends AbstractTest {

    private static final String TAG = "RecoverCADState";

    @Override
    public void test(String[] args) {
        super.test(args);

        try {
            ObjectInputStream in = new ObjectInputStream(new FileInputStream(getDefTempFile(args)));
            List<Class<? extends Shape>> shapes = (List<Class<? extends Shape>>)in.readObject();

            Line.deserializeStaticState(in);

            List<Shape> s = (List<Shape>)in.readObject();
            Log.vn(s.toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    @Override
    protected String getTag() {
        return TAG;
    }
}
